import React from 'react';
import service from "../services.js"
import { useState } from "react";
function Register(){
    const [user,setUser] = useState("")
    const [pass,setPass] = useState("")
    let registerAdd = async ()=>{
        const res = await service.registerAdd(user,pass)
        console.log(res);
    }
    return (
        <>
        用户名：
         <input
          type="text"
          onChange={(e)=>{setUser(e.target.value)}}
        />
         密码：
         <input
          type="text"
          onChange={(e)=>{setPass(e.target.value)}}
        />
         <button onClick={registerAdd}>注册</button>
        </>
    )
}
export default Register